<html>
<head>
<title>User Selected</title>
</head>
<body>
<p><font color="#0080FF" size="25">Select User</font></p>

<%
	String DRIVER = "com.mysql.jdbc.Driver";
	Class.forName(DRIVER);

	Connection con=null;
	ResultSet rst=null;
	Statement stmt=null;

	try
	{
		String url="jdbc:mysql://ecstiger.cs.andrews.edu/d562_2010_01?user=u562_2010_01&password=YPJ8f4We";
		con=DriverManager.getConnection(url);
		stmt=con.createStatement();
		String sql = "SELECT * FROM user WHERE id = '" + session.getAttribute("id") + "';";
                //out.println(sql);
                rst=stmt.executeQuery(sql);
                rst.next();
	      //out.println("<p> session.getAttribute(username): " + session.getAttribute("username") + "</p>");
            //out.println("<p> request.getParameter(oldpassword): " + request.getParameter("oldpassword") + "</p>");
              
          %>
          <form  method="POST" action="manage_user_exec.jsp">
           Id:
          <input type="text" name="name" value="<%=rst.getString(1) %>"/>
          <br />
          <p>  
          Name:
          <input type="password" name="oldpassword" value= "rst.getString(2)" />
          <br />
          User Name:
          <input type="password" name="oldpassword" value= "rst.getString(3)" />
          <br />
          Password:
          <input type="password" name="oldpassword" value= "rst.getString(4)" />
          <br />
          lavel:
          <input type="password" name="newpassword" value= "rst.getString(5)" />
          <br /></p>
          <input type="submit" value="Update" />
          </form>



</body>
</html>
